<div id="static" style="background-color: #FFFFFF;min-height: 800px	;"></div>
<script>
	function setChartDiv(counts) {
		var liststr = "";
		if(counts > 1) {
			liststr += ' <div style="padding-top: 50px">';
			for(var i = 0; i < counts; i++) {
				if(i % 2 == 0) {
					liststr += '     <div class="row">';
					liststr += '        <div class="col-lg-6 col-xs-6 col-md-6" id="mychar' + (i + 1) + '" style="height: 350px"></div>';
					liststr += '        <div class="col-lg-6 col-xs-6 col-md-6" id="mychar' + (i + 2) + '" style="height: 350px"></div>';
					liststr += '     </div> ';
				}
			}
			liststr += ' </div>';
		} else {
			liststr += ' <div style="padding-top: 50px">';
			liststr += '     <div class="row">';
			liststr += '        <div class="col-lg-12 col-xs-12 col-md-12" id="mychar1" style="height: 350px"></div>';
			liststr += '     </div> ';
			liststr += ' </div>';
		}
		$("#static").html(liststr);
	}
	//为统计图赋值
	function setCharts(groupname) {
		var json = {
			url: GLOBAL.URL + "/chartinfo/queryChartGroupByName",
			type: 'post',
			data: {
				"groupName": groupname
			},
			successfn: function(data) {
				if(data.code == 0) {
					setChartOption(data.list);
				} else {
					AlertInfo("格式错误，不支持的统计类型！");
				}
			},
			errorfn: function() {
				//ajaxUpdataTable();
				//$.ligerDialog.warn("系统繁忙，请稍候再试");
			}
		};
		ajaxdata(json);
	}

	//加载商铺列表数据
	function setChartOption(data) {
		for(var i = 0; i < data.length; i++) {
			var mychar = echarts.init(document.getElementById("mychar" + (i + 1)));
			mychar.setOption(data[i]);
		}
	}
</script>